package com.yanqu.road.entity.activity.fivehero.cross;


import java.util.LinkedList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class CrossFiveHeroCity {

    private int groupId;
    private int activityId;
    private int cityId;

    private int campId; // 阵营
    private long occupyTime; // 占领时间

    private Map<Integer,CrossFiveHeroBattlePatrons> defPatronsMap = new ConcurrentHashMap<>(); // 防守门客裂表
    private boolean isDefPatronsUpdate = false;

    private LinkedList<CrossFiveHeroBattlePatrons> diePatronsList = new LinkedList<>(); //死亡的门客，先死的先复活
    private Map<Integer,CrossFiveHeroToken> defTokenMap = new ConcurrentHashMap<>(); // 防守门客裂表
    private long occUserId; // 占领的玩家

    private long lastRecoveryExtraTeamTime; // 最后一次恢复额外守军的时间

    private long expAddTime; // 加经验多额时间

    private Map<Integer,CrossFiveHeroBandit> banditMap = new ConcurrentHashMap<>(); // 山贼信息
    //1对应的是这个城的血量
    private Map<Long,Integer> killCountMap = new ConcurrentHashMap<>(); // 击杀数信息


    // ====================


    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public int getCampId() {
        return campId;
    }

    public void setCampId(int campId) {
        this.campId = campId;
    }

    public long getOccupyTime() {
        return occupyTime;
    }

    public void setOccupyTime(long occupyTime) {
        this.occupyTime = occupyTime;
    }

    public Map<Integer, CrossFiveHeroBattlePatrons> getDefPatronsMap() {
        return defPatronsMap;
    }

    public void setDefPatronsMap(Map<Integer, CrossFiveHeroBattlePatrons> defPatronsMap) {
        this.defPatronsMap = defPatronsMap;
        isDefPatronsUpdate = true;
    }


    public boolean isDefPatronsUpdate() {
        return isDefPatronsUpdate;
    }

    public void setDefPatronsUpdate(boolean defPatronsUpdate) {
        isDefPatronsUpdate = defPatronsUpdate;
    }

    public long getLastRecoveryExtraTeamTime() {
        return lastRecoveryExtraTeamTime;
    }

    public void setLastRecoveryExtraTeamTime(long lastRecoveryExtraTeamTime) {
        this.lastRecoveryExtraTeamTime = lastRecoveryExtraTeamTime;
    }

    public long getOccUserId() {
        return occUserId;
    }

    public void setOccUserId(long occUserId) {
        this.occUserId = occUserId;
    }

    public Map<Integer, CrossFiveHeroBandit> getBanditMap() {
        return banditMap;
    }

    public void setBanditMap(Map<Integer, CrossFiveHeroBandit> banditMap) {
        this.banditMap = banditMap;
    }

    public Map<Integer, CrossFiveHeroToken> getDefTokenMap() {
        return defTokenMap;
    }

    public void setDefTokenMap(Map<Integer, CrossFiveHeroToken> defTokenMap) {
        this.defTokenMap = defTokenMap;
    }

    public LinkedList<CrossFiveHeroBattlePatrons> getDiePatronsList() {
        return diePatronsList;
    }

    public void setDiePatronsList(LinkedList<CrossFiveHeroBattlePatrons> diePatronsList) {
        this.diePatronsList = diePatronsList;
        if(lastRecoveryExtraTeamTime == 0 && diePatronsList.size() != 0){
            lastRecoveryExtraTeamTime = System.currentTimeMillis();
        }
    }

    public long getExpAddTime() {
        return expAddTime;
    }

    public void setExpAddTime(long expAddTime) {
        this.expAddTime = expAddTime;
    }


    public Map<Long, Integer> getKillCountMap() {
        return killCountMap;
    }

    public void setKillCountMap(Map<Long, Integer> killCountMap) {
        this.killCountMap = killCountMap;
    }
}
